/**
 * Layers.java
 *
 * Copyright (c) 2010 Prj.Manager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Prj.Manager .
 **/

package ro.prjmanager.model;


import javax.persistence.*;

/**
 * This class from the domain model is mapping the table layers
 * @author Viorel Tacliciu
 * @version 1
 */

@Table(name="layers")
@Entity
public class  Layers{

    //define attributes that maps all columns of the coresponding table
    //this attribute maps the primary key column ID
    private java.lang.Integer id;
    //this attribute maps an bidirectional association
    //it means that FK_LAYER from table project_layers is a foreign key to ID
    private java.util.List<ProjectLayers> fkLayerProjectLayers;
    //this attribute maps the column NAME
    private  java.lang.String  name;
    //this attribute maps the column SRC
    private  java.lang.String  src;
    //this attribute maps the column RES
    private  java.lang.String  res;
    //this attribute maps the column WEB
    private  java.lang.String  web;
    //end mapping columns

    //define getters and setters with coresponding ejb3 annotation, depending of the type
    //of the relation for the column

    /**
     * Mapping the primary key
     * @return - java.lang.Integer the primary key for this entity
     **/
    @Id
                 @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    public  java.lang.Integer  getId(){
        return this.id;
    }

    /**
     * The setter for ID column
     * @param id -  an java.lang.Integer object
     **/
    public void setId( java.lang.Integer  id){
        this.id=id;
    }
    /**
     * This method maps an OneToMany relation between this table and
     * ProjectLayers table
     * @return - an list of ProjectLayers objects
     **/
    @OneToMany(cascade=CascadeType.REFRESH)
    @JoinColumn(name = "FK_LAYER",referencedColumnName = "ID") 
    public java.util.List<ProjectLayers> getFkLayerProjectLayers(){
        return this.fkLayerProjectLayers;
    }
    
    /**
     * This method sets the field fkLayerProjectLayers of this entity
     * @param fkLayerProjectLayers - an list of ProjectLayers objects
     **/
    public void setFkLayerProjectLayers(java.util.List<ProjectLayers> fkLayerProjectLayers){
        this.fkLayerProjectLayers=fkLayerProjectLayers;
    }
    /**
     * This method gets the name attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "NAME")
    public  java.lang.String  getName(){
        return this.name;
    }

    /**
     * The setter for NAME column
     * @param name -  an  java.lang.String  object
     **/
    public void setName( java.lang.String  name){
        this.name=name;
    }
    /**
     * This method gets the src attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "SRC")
    public  java.lang.String  getSrc(){
        return this.src;
    }

    /**
     * The setter for SRC column
     * @param src -  an  java.lang.String  object
     **/
    public void setSrc( java.lang.String  src){
        this.src=src;
    }
    /**
     * This method gets the res attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "RES")
    public  java.lang.String  getRes(){
        return this.res;
    }

    /**
     * The setter for RES column
     * @param res -  an  java.lang.String  object
     **/
    public void setRes( java.lang.String  res){
        this.res=res;
    }
    /**
     * This method gets the web attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "WEB")
    public  java.lang.String  getWeb(){
        return this.web;
    }

    /**
     * The setter for WEB column
     * @param web -  an  java.lang.String  object
     **/
    public void setWeb( java.lang.String  web){
        this.web=web;
    }
}



